package com.cloudpan.common.annotate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @Author sc
 * @DATE 2023/11/7 13:25
 * @Description: 校验密码
 * @Version 1.0
 */

@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = { PWDValidator.class })
public @interface PasswordVaild {

    String message() default "密码至少包含字母,数字";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

}
